import java.util.Scanner;

/**
 * @author zzy
 * @date 2022/9/27 16:29
 */

public class zzy{

    public static void main(String [] args) {
        Scanner input = new Scanner ( System.in );
        int Numbers[] = new int[10];
        int QuChong[] = new int[10];
        int j = - 1;
        int k = 0;
        for ( int i = 0 ; i < 10 ; i++ ) {
            Numbers[i] = input.nextInt ( );
            while ( j >= 0 ) if ( Numbers[i] == QuChong[j] ) {
                break;
            }
            else j--;
            if ( j == - 1 ) {
                QuChong[k] = Numbers[i];
                j = k;
                k++;
            }
        }
        System.out.println ("去重后");
        for ( int f = 0 ; f < k ; f++ ) {
            System.out.print (" "+QuChong[f]);
        }
    }
}
